#include<stdio.h>
#include<stdlib.h>
char* strcat(char* str1,char* str2)
{
	int length = 0;
	while(str1[length]!='\0')
	{
		length++;
	}

	while(str2[length]!='\0')
	{
		str1[length] = str2[length];
		str1++;
		str2++;
	}
	char* dest  = (char*)malloc(length+1);
	for(int i=0; i<length; i++)
	{
		dest[i] = str1[i];
	
	}
	dest[length] = '\0';
	return dest;
}

void main()
{
	char str1[20],str2[30];
	int length = 20;
	printf("input str1:\n");
	gets(str1);
	printf("input str2:\n");
	gets(str2);
	puts(str1);
//	strcat("abc","def");
//	printf("%s",dest);
}